package com.jt.www.enums.endorse;


import org.apache.commons.lang.StringUtils;

/**
 * 批单状态 枚举
 *
 * @author
 * @date
 */


public enum EndorsementsStatusEnum {

    ENDORS_STATUS_01("00", "已提交"),
    ENDORS_STATUS_02("01", "待复核"),
    ENDORS_STATUS_03("03", "已出单"),
    ENDORS_STATUS_04("04", "出单失败"),
    ENDORS_STATUS_05("05", "待审核"),
    ENDORS_STATUS_06("06", "审核失败"),
    ENDORS_STATUS_08("08", "复核失败"),
    ENDORS_STATUS_10("10", "单证待上传"),
    ENDORS_STATUS_11("11", "已完成"),
    ENDORS_STATUS_12("12", "待关联"),
    ENDORS_STATUS_99("99", "删除");


    private String status;

    private String desc;

    EndorsementsStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static String getDescByStatus(String status) {
        if (StringUtils.isBlank(status)) {
            return "";
        }
        for (EndorsementsStatusEnum endorsementsTypeEnum : EndorsementsStatusEnum.values()) {
            if (endorsementsTypeEnum.status.equals(status)) {
                return endorsementsTypeEnum.desc;
            }
        }
        return "";
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
